import { BaseService } from './base-service'

class ClientService extends BaseService{

  
  
  
  /********************************
   * 飞书员工获取 API
   ********************************/

   /**
   * 获取已开通的授权项（仅抖音）
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @return {Object} data
   */
    getAuthTiktokUrl(params) {
      return this.request({
        method: 'get',
        url: `/client/oauth/useritem`,
        params,
      })
    }
  
  
  /********************************
   * 用户 信息 API
   ********************************/
   
   /**
   * 根据key登录
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @return {Object} data
   */
    unionLogin(params) {
      return this.request({
        method: 'get',
        url: `/client/organization/feishu/${params.key}`,
      })
    }
    

  /**
   *  获取当前用户信息
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
  getUserInfo() {
    return this.request({
      method: 'get',
      url: `/client/user`,
    })
  }
/**
   *  获取当前列表
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
  getList(params) {
    return this.request({
      method: 'get',
      url: `/api/getList`,
      params,
    })
  }
 /**
   *  获取详情
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getImportantAttention(data) {
  return this.request({
    method: 'post',
    url: `/api/getImportantAttention`,
    data,
  })
} 
 /**
   *  模糊查询
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getUser(params) {
  return this.request({
    method: 'get',
    url: `/api/queryFeiShuUser`,
    params,
  })
} 
 /**
   *  任务委派
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getDelegateTask(data) {
  return this.request({
    method: 'post',
    url: `/api/delegateTask`,
    data,
  })
} 
 /**
   *  问题上升
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getProblemUp(data) {
  return this.request({
    method: 'post',
    url: `/api/problemUp`,
    data,
  })
} 
 /**
   *  AS
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getEmphasisList(data) {
  return this.request({
    method: 'get',
    url: `/api/getEmphasisList`,
    data,
  })
} 
 /**
   *  图片
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getImgList(params) {
  return this.request({
    method: 'get',
    url: `/api/getImg`,
    params,
  })
} 


 /**
   *  goutong 
   *
   * @author ylq
   * @param  {Object} params
   * @param  {String} params.key
   * @param  {String} params.code
   * @returns
   * @memberof SSOService
   */
 getAssignList(data) {
  return this.request({
    method: 'post',
    url: `/api/sentMessage`,
    data,
  })
} 
}

export const clientService = new ClientService()

